package com.nice.common.memory;

public class PoolBufferException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private String message;
    private Throwable cause;

    public PoolBufferException(String messege, Throwable cause) {
        this.message = messege;
        this.cause = cause;
    }

    public PoolBufferException(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        if (cause != null)
            return message + ":" + cause.getMessage();
        else
            return message;
    }

}
